Skip to content

refactor: Handle common ReleaseMode.release logic in Dart#2017

Merged
Gustl22 merged 1 commit into
mainfrom
gustl22/dart-release-mode
Jul 21, 2026
Merged

refactor: Handle common ReleaseMode.release logic in Dart#2017
Gustl22 merged 1 commit into
mainfrom
gustl22/dart-release-mode

Conversation

@Gustl22

@Gustl22 Gustl22 commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Description

To more granularly handle releasing resources in ReleaseMode.release it is desirable to handle it on the Dart side. This mitigates following problems:

  • Every platform uses the same logic, how / when resources are released (here: onComplete event, on stop action)
  • Handle events / actions in a specific order, which is only possible when awaiting events

Checklist

  • The title of my PR starts with a Conventional Commit prefix (fix:, feat:, refactor:,
    docs:, chore:, test:, ci: etc).
  • I have read the Contributor Guide and followed the process outlined for submitting PRs.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation and added dartdoc comments with ///, where necessary.
  • I have updated/added relevant examples in example.

Breaking Change

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

It is a partly breaking change: The main package is not breaking anything, but the contract with the endorsed federated plugin packages has shifted. I personally would consider that as non breaking, as I doubt someone is relying on the interface where the ReleaseMode.release is handled.

Before:

ReleaseMode.release is considered in the federated plugin implementation

After:

ReleaseMode.release should not be handled in the federated plugin implementation

Related Issues

@Gustl22
Gustl22 merged commit 6efd636 into main Jul 21, 2026
56 of 58 checks passed
@Gustl22
Gustl22 deleted the gustl22/dart-release-mode branch July 21, 2026 21:09
Sebastien-VZN pushed a commit to Sebastien-VZN/audioplayers that referenced this pull request Jul 23, 2026
Commits marqués comme analyses et non portes:
- 310304d ci: Upgrade CI Flutter version to v3.44.6 (bluefireteam#2014) — cosmétique CI
- 244a4a0 ci: Support verbose debugging in tests (bluefireteam#2015) — cosmétique CI
- 0b89829 test: Set timeouts for integration tests (bluefireteam#2016) — cosmétique tests
- 6efd636 refactor: Handle common ReleaseMode.release logic in Dart (bluefireteam#2017) — redondant, deja gere nativement
- fa6ec8e feat!: Add PlayingStateUpdate event (bluefireteam#1995) — over-engineering, 500 lignes pour rien
- cd475c7 fix(windows): Crash Windows N Media Feature Pack (bluefireteam#2019) — try-catch global du fork couvre deja le cas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants